/*
 * Euclid_FiltrosApp.java
 */

package euclid_filtros;

import java.util.EventObject;
import org.jdesktop.application.Application;
import org.jdesktop.application.SingleFrameApplication;

/**
 * The main class of the application.
 */
public class Euclid_FiltrosApp extends SingleFrameApplication {
    Euclid_FiltrosView euclidView;
    /**
     * At startup create and show the main frame of the application.
     */
    @Override
    protected void startup() {
        euclidView = new Euclid_FiltrosView(this);
        this.addExitListener(new ExitListener() {

            public boolean canExit(EventObject event) {
                //TODO perguntar se quer sair
                return true;
            }

            public void willExit(EventObject event) {
            }
        });
        show(euclidView);
    }

    /**
     * This method is to initialize the specified window by injecting resources.
     * Windows shown in our application come fully initialized from the GUI
     * builder, so this additional configuration is not needed.
     */
    @Override protected void configureWindow(java.awt.Window root) {
    }

    /**
     * A convenient static getter for the application instance.
     * @return the instance of Euclid_FiltrosApp
     */
    public static Euclid_FiltrosApp getApplication() {
        return Application.getInstance(Euclid_FiltrosApp.class);
    }

    /**
     * Main method launching the application.
     */
    public static void main(String[] args) {
        launch(Euclid_FiltrosApp.class, args);
    }
}
